import request from './request.js'

export const getComments = params => {
	return request({
		method:'GET',
		url:'/app/v1_0/comments',
		params
	})
}
//点赞
export const addCommentLike = commentId => {
	return request({
		method:'POST',
		url:'/app/v1_0/comment/likings',
		data: {
			target:commentId
		}
	})
}
export const deleteCommentLike = commentId => {
	return request({
		method:'DELETE',
		url:`/app/v1_0/comment/likings/${commentId}`,
		
	})
}

//添加评论或回复评论
export const addComment = data => {
	return request({
		method:'POST',
		url:'/app/v1_0/comments',
		data
	})
}
